import React from "react";
import s from "./index.scss";

import { Flex ,Icon} from "antd-mobile";
import QueueAnim from "rc-queue-anim";
import downapp from 'assets/images/appdown/downapp.png'

import { hashHistory } from "React-router";


export default class extends React.PureComponent {
    constructor(props){
        super(props)
        this.state={
            isHide:true
        }
        this.close = this.close.bind(this)
    }   

    close(){
        this.setState({
            isHide:false
        })
    }
  render() {
    return (<QueueAnim type="right" leaveReverse >
                {this.state.isHide?
                <Flex key='a' className={`${s.AnnouncementBox}`}>
                    <Flex.Item className={`${s.left}`}><Icon type="cross" color="#fff" size="lg" onClick={this.close}/><img src={downapp} style={{width:'1.28rem',height:"0.28rem"}}/></Flex.Item>
                    <Flex.Item className={`${s.right}`}>
                        <a className={`${s.downBtn}`} href="http://a.app.qq.com/o/simple.jsp?pkgname=com.fangxin.anxintou">立即下载</a>
                    </Flex.Item>
                </Flex>
            :null}
            </QueueAnim>)
  }
}
